﻿CREATE proc thuan_qtdanhmucnhomchuongtrinhsua  
@ID int,  
@DienGiai nvarchar(255) ,
@ThuTuSapXep int  
as  
if exists(select * from DanhMuc_NhomChuongTrinh Where NhomCT<>@ID and DienGiai=@DienGiai)  
begin  
select ErrCode=0  
end  
else  
begin  
update DanhMuc_NhomChuongTrinh set DienGiai=@DienGiai,ThuTuSapXep=@ThuTuSapXep WHere NhomCT=@ID  
select ErrCode=1  
end  